<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      GC-8.0.4
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-2020-04-02">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 2020-04-02
      </h4>
      <h3>
        Chapter&nbsp;13.&nbsp;Programming
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="gcc.html" title="GCC-9.3.0">Prev</a>
          <p>
            GCC-9.3.0
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="gdb.html" title="GDB-9.1">Next</a>
          <p>
            GDB-9.1
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="prog.html" title=
          "Chapter&nbsp;13.&nbsp;Programming">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="gc" name="gc"></a>GC-8.0.4
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to GC
        </h2>
        <p>
          The <span class="application">GC</span> package contains the
          Boehm-Demers-Weiser conservative garbage collector, which can be
          used as a garbage collecting replacement for the C malloc function
          or C++ new operator. It allows you to allocate memory basically as
          you normally would, without explicitly deallocating memory that is
          no longer useful. The collector automatically recycles memory when
          it determines that it can no longer be otherwise accessed. The
          collector is also used by a number of programming language
          implementations that either use C as intermediate code, want to
          facilitate easier interoperation with C libraries, or just prefer
          the simple collector interface. Alternatively, the garbage
          collector may be used as a leak detector for C or C++ programs,
          though that is not its primary goal.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "http://www.hboehm.info/gc/gc_source/gc-8.0.4.tar.gz">http://www.hboehm.info/gc/gc_source/gc-8.0.4.tar.gz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: 67a5093e2f9f381bd550aa891d00b54b
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 1.1 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 11 MB (with tests)
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 0.2 SBU (with tests)
              </p>
            </li>
          </ul>
        </div>
        <h4>
          Required
        </h4>
        <p class="required">
          <a class="xref" href="libatomic_ops.html" title=
          "libatomic_ops-7.6.10">libatomic_ops-7.6.10</a>
        </p>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/gc">http://wiki.linuxfromscratch.org/blfs/wiki/gc</a>
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of GC
        </h2>
        <p>
          Install <span class="application">GC</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class="command">./configure --prefix=/usr      \
            --enable-cplusplus \
            --disable-static   \
            --docdir=/usr/share/doc/gc-8.0.4 &amp;&amp;
make</kbd>
</pre>
        <p>
          To test the results, issue: <span class="command"><strong>make
          check</strong></span>.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install &amp;&amp;
install -v -m644 doc/gc.man /usr/share/man/man3/gc_malloc.3</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <em class=
          "parameter"><code>--docdir=/usr/share/doc/gc-8.0.4</code></em>:
          This option is used so the package will install the documentation
          in a versioned directory.
        </p>
        <p>
          <em class="parameter"><code>--enable-cplusplus</code></em>: This
          parameter enables the building and installing of the C++ library
          along with the standard C library.
        </p>
        <p>
          <em class="parameter"><code>--disable-static</code></em>: This
          switch prevents installation of static versions of the libraries.
        </p>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Programs:</strong>
              <span class="segbody">None</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Libraries:</strong>
              <span class="segbody">libcord.so, libgc.so, and
              libgccpp.so</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directories:</strong>
              <span class="segbody">/usr/include/gc and
              /usr/share/doc/gc-8.0.4</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="libgc" name="libgc"></a><span class=
                    "term"><code class="filename">libgc.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    contains a C interface to the conservative garbage
                    collector, primarily designed to replace the C malloc
                    function.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libgccpp" name="libgccpp"></a><span class=
                    "term"><code class="filename">libgccpp.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    contains a C++ interface to the conservative garbage
                    collector.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-02-16 14:25:07 -0600
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="gcc.html" title="GCC-9.3.0">Prev</a>
          <p>
            GCC-9.3.0
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="gdb.html" title="GDB-9.1">Next</a>
          <p>
            GDB-9.1
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="prog.html" title=
          "Chapter&nbsp;13.&nbsp;Programming">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
